import {useFocusEffect} from '@react-navigation/native';
import {
  Badge,
  Box,
  Center,
  HStack,
  Image,
  Pressable,
  ScrollView,
  Text,
  VStack,
} from 'native-base';
import {useCallback, useState} from 'react';
import {SafeAreaView, StyleSheet} from 'react-native';
import UserCard from './UserCard/UserCard';
import Card from '@/components/Card';
import React from 'react';
import ServiceCard from './ServiceCard/ServiceCard';

export default function Home() {
  const resfreshList = useCallback(() => {
    const fetchYglist = async () => {
      // setRefresh(false);
    };
    fetchYglist();
  }, []);
  useFocusEffect(resfreshList);
  return (
    <SafeAreaView>
      <ScrollView style={homeStyle.homeStyle}>
        <Box>
          <UserCard></UserCard>
        </Box>
        <Box>
          <ServiceCard></ServiceCard>
        </Box>
      </ScrollView>
    </SafeAreaView>
  );
}

const homeStyle = StyleSheet.create({
  homeStyle: {
    padding: 10,
    height: '100%',
  },
  hearderImg: {
    resizeMode: 'stretch',
  },
  cardStyle: {
    width: '100%',
    height: '100%',
    backgroundColor: 'white',
  },
});
